<?php
class billboard{
	public function init($params=array()){
		$this->db=$this->yum->library('mysql');
		$this->prefix=$this->yum->vars('app','prefix');
	}
	public function GBoard($params=array()){
    	return $this->db->select($this->prefix.'billboard AS A',$params);
    }
    public function GFull($params=array()){
		if(!isset($params['select'])){
			$params['select']='A.id,B.mail,A.name,A.format,A.usage,A.modality,A.adcolumn,A.member,A.time,A.locked';
		}
    	return $this->db->select($this->prefix.'billboard AS A LEFT JOIN '.$this->prefix.'member AS B ON A.member=B.id',$params);
    }
    public function IBoard($params,$mode=0){
		return $this->db->insert($this->prefix.'billboard',$params,$mode);
	}
	public function UBoard($params){
		return $this->db->update($this->prefix.'billboard',$params);
	}
}
?>